<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="vue2610.js"></script>
    <title>vue计算属性</title>
</head>

<body>
    <div id="app">
        <input type="text" v-model="firstname">
        <input type="text" v-model="lastname">
        {{fullname}}
    </div>
</body>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            firstname: 'queit',
            lastname: "it..."
        },
        computed: {
            fullname(){
                return this.firstname + this.lastname
            }
        },

    });

</script>

</html>